import request from '@/utils/request'

// 查询账户信息列表
export function listAccount(query) {
	return request({
		url: '/account/account/list',
		method: 'get',
		params: query
	})
}


{
	"mchid": "1900006XXX",
	"out_trade_no": "1217752501201407033233368318",
	"appid": "wxdace645e0bc2cXXX",
	"description": "Image形象店-深圳腾大-QQ公仔",
	"notify_url": "https://www.weixin.qq.com/wxpay/pay.php",
	"amount": {
		"total": 1,
		"currency": "CNY"
	},
	"payer": {
		"openid": "o4GgauInH_RCEdvrrNGrntXDuXXX"
	}
}

{
	"out_trade_no": "287996602",
	"description": "我是一个商品",
	"notify_url": "https://www.baidu.com",
	"amount": {
		"total": 1,
		"currency": "CNY"
	},
	"scene_info": {
		"payer_client_ip": "192.168.0.103"
	},
	"appid": "wx96eca6fb0a08c588",
	"mchid": "1564162121",
	"trade_type": "JSAPI",
	"payer": {
		"openid": "o6Kjkafkldajkfdskjfjkdfkjx-bfmdfmd5"
	}
}


// 查询账户信息详细
export function getAccount(id) {
	return request({
		url: '/account/account/' + id,
		method: 'get'
	})
}

// 新增账户信息
export function addAccount(data) {
	return request({
		url: '/account/account',
		method: 'post',
		data: data
	})
}

// 修改账户信息
export function updateAccount(data) {
	return request({
		url: '/account/account',
		method: 'put',
		data: data
	})
}

// 删除账户信息
export function delAccount(id) {
	return request({
		url: '/account/account/' + id,
		method: 'delete'
	})
}